<?php

namespace example\controller;

use restphp\http\RestHttpRequest;

/**
 * @RequestMapping ("/test")
 */
class ControllerWithAop
{
    /**
     * @Get(value = "")
     * @MyAop (value="aop controller")
     * @return void
     */
    public function test()
    {
        echo "hello aop!";
    }

    /**
     * @Get(value = "/apps/{appId}")
     * @return void
     */
    public function test2()
    {
        $appId = RestHttpRequest::getPathValue("appId");
        echo "app id ${appId}";
    }
}